﻿using System;
using System.Collections.Generic;
using System.Text;
using Slippor.Douban.Radio.Tracker;
using Slippor.Utility.WebWorker;
using Slippor.Douban.Radio.Assist;

namespace Slippor.Douban.Radio.BaseForm
{
    class GaTracker : ITracker
    {
        #region ITracker Members

        public string Name
        {
            get { return "GA"; }
        }

        public void Track(Assist.Song song)
        {
            throw new NotImplementedException();
        }

        private readonly GaWebWorker _webWorker = new GaWebWorker();
        public void TrackUpdate(ICommand command, Song song)
        {
            _webWorker.AchieveResponse("", null, null, false, RequestMethod.Get);
        }

        public void Clear()
        {
            ;
        }

        #endregion

        #region ITracker Members
        public void Stop()
        {
            ;
        }

        public void Pause()
        {
        }

        public void Resume()
        {
        }
        #endregion
    }

    class GaWebWorker :AbstractWebWorker
    {
        public const string DoubanLoginUrl = "http://www.douban.com/login";
        public GaWebWorker()
        {
            _userAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
            _timeOut = 30000;
        }

        protected override byte[] SetLoginInfo(string username, string password)
        {
            throw new NotImplementedException();
        }
    }
}
